import { post, get } from '@/utils/http'

/**
 * 根据菜单获取功能操作列表
 * @param {*} data 
 * @returns 
 */
export const getOperationsByMenuId = data => get('/api/operation/getOperationsByMenuId', data)

/**
 * 新增功能
 * @param {*} data 
 * @param {*} callback 
 * @returns 
 */
export const addOperation = (data, callback) => post('/api/operation/addOperation', data, null, callback)

/**
 * 编辑功能
 * @param {*} data 
 * @param {*} callback 
 * @returns 
 */
export const editOperation = (data, callback) => post('/api/operation/editOperation', data, null, callback)

/**
 * 删除功能
 * @param {*} data 
 * @returns 
 */
export const deleteOperation = data => post('/api/operation/deleteOperation', null, data)
